﻿using System.Windows;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Composite.UnityExtensions;
using SharePointUtilitiesForDevelopers.Client.Wpf.Modules.SiteNavigator;

namespace SharePointUtilitiesForDevelopers.Client.Wpf
{
    /// <summary>
    /// Application bootstrapper.
    /// </summary>
    public class Bootstrapper : UnityBootstrapper
    {
       /// <summary>
        /// Creates the shell.
        /// </summary>
        /// <returns></returns>
        protected override DependencyObject CreateShell()
        {
           var shell = new Shell();
           Application.Current.MainWindow = shell;
           shell.Show();
           return shell;
        }

        /// <summary>
        /// Gets the module catalog.
        /// </summary>
        /// <returns></returns>
        protected override IModuleCatalog GetModuleCatalog()
        {
            var catalog = new ModuleCatalog().AddModule(typeof (SiteNavigatorModule));
            return catalog;
        }
    }
}
